﻿/* Colore icone nella toolbar */
.f-button svg {
    width: 20px;
    height: 20px;
}

.toolbar__item--custom_fav:hover svg {
    fill: #ff4b2b;
    stroke: #ff4b2b;
}

.toolbar__item--custom_cart:hover svg {
    stroke: #2ecc71;
}

.f-carousel__toolbar__column.is-right {
    gap: 8px;
}

.f-button-cart {
    width: auto;
    font-weight: normal;
    background-color: black;
    color: #fff;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    gap: 4px;
    border-radius: 8px;
}

    .f-button-cart:hover {
        background-color: #ffbc42 !important;
    }

#toast-container {
    z-index: 99999 !important;
}

.f-button-cart.is-in-cart {
    color: #696969;
    background-color: #EAEAEA;
}

    .f-button-cart.is-in-cart:hover {
        color: #505050 !important;
        background-color: #B5B5B5 !important;
    }

.fancybox__backdrop {
    background-color: #fff;
}



/* MANSORY */
.masonry-grid {
    column-count: 4; /* Numero di colonne su desktop */
    column-gap: 1.5rem; /* Spazio tra le colonne */
    width: 100%;
}

.masonry-item {
    display: inline-block; /* Fondamentale per non spezzare le foto tra colonne */
    width: 100%;
    break-inside: avoid;
    margin-bottom: 1.5rem; /* Spazio verticale tra le foto */
}

    .masonry-item img {
        height: auto; /* Mantiene il rapporto d'aspetto corretto */
        display: block;
        width: 100%;
    }

/* Responsive: meno colonne su schermi piccoli */
@media (max-width: 1200px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
}


/* CART BUTTON */
.cart-overlay {
    z-index: 10;
    transition: transform 0.2s ease-in-out;
}

    .cart-overlay:hover {
        transform: scale(1.1); /* Leggero zoom al passaggio del mouse */
    }

/* Stile per l'icona nel bottone */
.btn-cart-grid {
    background: rgba(0, 0, 0, 0.5); /* Cerchio scuro semitrasparente */
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.3s;
}

    .btn-cart-grid.is-in-cart {
        background: #198754; /* Verde Bootstrap quando è nel carrello */
        color: white;
    }

    .btn-cart-grid:hover {
        background: rgba(0, 0, 0, 0.8);
        color: white;
    }


/* FORMATTAZIONE ELEMENTI */

/* Card styling */
.selfie-card, .bib-card, .info-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    .selfie-card:hover, .bib-card:hover, .info-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
    }

/* Card headers with gradients */
.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.bg-gradient-info {
    background: var(--info-gradient) !important;
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

/* Selfie upload styling */
.selfie-upload-wrapper {
    position: relative;
}

    .selfie-upload-wrapper .form-control {
        border: 2px dashed #e9ecef;
        border-radius: 0.75rem;
        background: linear-gradient(to right, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
        transition: all 0.3s ease;
        cursor: pointer;
        padding: 2rem 1rem;
        text-align: center;
    }

        .selfie-upload-wrapper .form-control:hover {
            border-color: #667eea;
            background: linear-gradient(to right, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
        }

        .selfie-upload-wrapper .form-control:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        }

/* Selfie validation badge styling */
#selfie-validation-badge {
    background-color: #28a745;
    border: 4px solid white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none !important;
}

    #selfie-validation-badge.badge-visible {
        display: flex !important;
        align-items: center;
        justify-content: center;
        animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

@keyframes badgePop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#selfie-validation-badge i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

#selfie-preview-img {
    border: 3px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: imageFadeIn 0.4s ease-out;
}

@keyframes imageFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#selfie-preview-img:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* Validation message styling */
.alert-sm {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#selfie-validation-message .alert {
    border-left: 4px solid currentColor;
}

/* Search button styling */
.search-button {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

    .search-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    }

    .search-button:active:not(:disabled) {
        transform: translateY(0);
    }

    .search-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Form labels styling */
.form-label {
    color: #1f2937;
    font-size: 0.95rem;
}

/* Bib number input */
#bib-number {
    font-size: 1rem;
}

    #bib-number:focus {
        border-color: #0ea5e9;
        box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
    }

/* Info box styling */
.bg-light {
    background: #f9fafb !important;
}